package com.teaphy.coroutinecrawler.flow.operators.filter

import kotlinx.coroutines.flow.*
import kotlinx.coroutines.runBlocking

fun main() = runBlocking {
    flow {
        emit(1)
        emit(2)
        emit(null)
        emit(3)
        emit(null)
        emit(4)
    }.filterNotNull()
        .collect {
            println("接收到的数据：$it")
        }

    println("Done")
}